
#ifndef _MEMBER_BFolder_H_
#define _MEMBER_BFolder_H_

#include <BMap>
#include <BIcon>
#include <BEntry>
#include <BFolder>

#define folder_member(folder)		((member_BFolder*)((BFolder*)folder)->_ptr)

#ifdef linux
#include <unistd.h>
#include <dirent.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/inotify.h>
#endif

#ifdef _WIN32
#include <Windows.h>
#undef min
#undef max
#endif

namespace BWE
{
	class member_BFolder
	{
	public:
		member_BFolder(BFolder* folder);
		~member_BFolder();

		BFolder*				boss;
		BString					path;
		Attrib					attribFilter;
		BString					nameFilter;
		BArray<BEntryHolder>	entries;
		bool					notifying;
#ifdef linux
		DIR* 					dir;
		int						nty;
#endif
#ifdef _WIN32
		BMap<int, HANDLE>		handlesMap;
		bool					isOpened;
#endif
	};
}

#endif
